package org.lgiavedoni.android.franq.event.listener;

import org.lgiavedoni.android.franq.core.calendar.RegisterCalendarEvent;
import org.lgiavedoni.android.franq.core.envent.Event;
import org.lgiavedoni.android.franq.core.envent.listener.EventListener;
import org.lgiavedoni.android.franq.service.phone.calendar.CalendarService;

public class CalendarEventListener extends EventListener {

	@Override
	public void exec(Event event) {
		if (event instanceof RegisterCalendarEvent)
			CalendarService.inst.addCalendarEvent(((RegisterCalendarEvent) event).toCalendarEvent());
	}

	@Override
	public Class<Event> getClassEvent() {
		return Event.class;
	}

}
